﻿using System;
using System.Collections;
using System.Windows.Forms;
using YJKRevitFamilyDataBase;

namespace YJKFamilyLibManager.FamilyLibModule
{
	public class SorteList : ListBox, IComparer
	{
		int IComparer.Compare(object x, object y)
		{
			if (!(x is DbParamDefinition) || !(y is DbParamDefinition))
			{
				return 0;
			}
			int order = ((DbParamDefinition)x).Order;
			int order2 = ((DbParamDefinition)y).Order;
			if (order > order2)
			{
				return order2;
			}
			return order;
		}
	}
}
